package com.hjsmallfly.syllabus.base

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.hjsmallfly.syllabus.App

abstract class BaseKtFragment : BaseFragment() {

    private val app: App
        get() = App.getApp()

    private val act: BaseActivity
        get() = activity as BaseActivity

    public val appComponent by lazy { app.appComponent }

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        return inflater.inflate(contentView, container, false)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        init(savedInstanceState)
    }
}